package com.freesun.autoui.product.healthcenter.pageaction;

import com.freesun.autoui.product.healthcenter.pagemodel.LogOutPageModel;
import com.freesun.autoui.product.healthcenter.pagemodel.LoginPageModel;
import org.openqa.selenium.WebDriver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * desc:logoutaction
 * Created by yangfei on 13-12-31.
 */
public class LogOutPageAction {

    private static Logger log = LoggerFactory.getLogger(LoginPageAction.class.getClass());

    /**
     * @desc 系统退出登录
     * @param driver
     */
    public static void logOut(WebDriver driver,String intoUrl){
        //driver.navigate().to(intoUrl);
        LogOutPageModel.logOut(driver).click();
        log.warn("退出登录!");
    }

    public static Boolean checkLogOutTest(WebDriver driver){
        //String lot = LogOutPageModel.logOut(driver).getText();
        Boolean bl= LoginPageModel.loginId(driver).isEnabled();
        log.warn("退出登录成功!");
        return bl;
    }
}
